package com.woniu.p2p.listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.woniu.p2p.excelservice.InScoreService;
import com.woniu.p2p.vo.ImportScoreVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author 86152
 * @create 2020/8/15
 * @since 1.0.0
 */
@Component
public class ScoreListener extends AnalysisEventListener<ImportScoreVo> {
    @Autowired
    InScoreService inScoreService;
    @Override
    public void invoke(ImportScoreVo importScoreVo, AnalysisContext analysisContext) {
        inScoreService.readExcel(importScoreVo);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
